# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class TransactionLinkUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'inward_id': 'int',
        'link_type_id': 'int',
        'link_type_name': 'str',
        'notes': 'str',
        'outward_id': 'int'
    }

    attribute_map = {
        'inward_id': 'inward_id',
        'link_type_id': 'link_type_id',
        'link_type_name': 'link_type_name',
        'notes': 'notes',
        'outward_id': 'outward_id'
    }

    def __init__(self, inward_id=None, link_type_id=None, link_type_name=None, notes=None, outward_id=None):  # noqa: E501
        """TransactionLinkUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._inward_id = None
        self._link_type_id = None
        self._link_type_name = None
        self._notes = None
        self._outward_id = None
        self.discriminator = None

        self.inward_id = inward_id
        self.link_type_id = link_type_id
        if link_type_name is not None:
            self.link_type_name = link_type_name
        if notes is not None:
            self.notes = notes
        self.outward_id = outward_id

    @property
    def inward_id(self):
        """Gets the inward_id of this TransactionLinkUpdate.  # noqa: E501

        The inward transaction journal_id for the link. This becomes the 'is paid by' transaction of the set.  # noqa: E501

        :return: The inward_id of this TransactionLinkUpdate.  # noqa: E501
        :rtype: int
        """
        return self._inward_id

    @inward_id.setter
    def inward_id(self, inward_id):
        """Sets the inward_id of this TransactionLinkUpdate.

        The inward transaction journal_id for the link. This becomes the 'is paid by' transaction of the set.  # noqa: E501

        :param inward_id: The inward_id of this TransactionLinkUpdate.  # noqa: E501
        :type: int
        """
        if inward_id is None:
            raise ValueError("Invalid value for `inward_id`, must not be `None`")  # noqa: E501

        self._inward_id = inward_id

    @property
    def link_type_id(self):
        """Gets the link_type_id of this TransactionLinkUpdate.  # noqa: E501

        The link type ID to use. You can also use the link_type_name field.  # noqa: E501

        :return: The link_type_id of this TransactionLinkUpdate.  # noqa: E501
        :rtype: int
        """
        return self._link_type_id

    @link_type_id.setter
    def link_type_id(self, link_type_id):
        """Sets the link_type_id of this TransactionLinkUpdate.

        The link type ID to use. You can also use the link_type_name field.  # noqa: E501

        :param link_type_id: The link_type_id of this TransactionLinkUpdate.  # noqa: E501
        :type: int
        """
        if link_type_id is None:
            raise ValueError("Invalid value for `link_type_id`, must not be `None`")  # noqa: E501

        self._link_type_id = link_type_id

    @property
    def link_type_name(self):
        """Gets the link_type_name of this TransactionLinkUpdate.  # noqa: E501

        The link type name to use. You can also use the link_type_id field.  # noqa: E501

        :return: The link_type_name of this TransactionLinkUpdate.  # noqa: E501
        :rtype: str
        """
        return self._link_type_name

    @link_type_name.setter
    def link_type_name(self, link_type_name):
        """Sets the link_type_name of this TransactionLinkUpdate.

        The link type name to use. You can also use the link_type_id field.  # noqa: E501

        :param link_type_name: The link_type_name of this TransactionLinkUpdate.  # noqa: E501
        :type: str
        """

        self._link_type_name = link_type_name

    @property
    def notes(self):
        """Gets the notes of this TransactionLinkUpdate.  # noqa: E501

        Optional. Some notes.  # noqa: E501

        :return: The notes of this TransactionLinkUpdate.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this TransactionLinkUpdate.

        Optional. Some notes.  # noqa: E501

        :param notes: The notes of this TransactionLinkUpdate.  # noqa: E501
        :type: str
        """

        self._notes = notes

    @property
    def outward_id(self):
        """Gets the outward_id of this TransactionLinkUpdate.  # noqa: E501

        The outward transaction journal_id for the link. This becomes the 'pays for' transaction of the set.  # noqa: E501

        :return: The outward_id of this TransactionLinkUpdate.  # noqa: E501
        :rtype: int
        """
        return self._outward_id

    @outward_id.setter
    def outward_id(self, outward_id):
        """Sets the outward_id of this TransactionLinkUpdate.

        The outward transaction journal_id for the link. This becomes the 'pays for' transaction of the set.  # noqa: E501

        :param outward_id: The outward_id of this TransactionLinkUpdate.  # noqa: E501
        :type: int
        """
        if outward_id is None:
            raise ValueError("Invalid value for `outward_id`, must not be `None`")  # noqa: E501

        self._outward_id = outward_id

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, TransactionLinkUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
